@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f0f5;
    background-image: url('background.jpg');
    background-size: cover;
    background-attachment: fixed;
}

.container {
    display: flex;
}

.sidebar {
    width: 250px;
    background-color: rgba(47, 49, 54, 0.9);
    color: #fff;
    height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    position: fixed;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sidebar img {
    border-radius: 50%;
    width: 100px;
    display: block;
    margin: 0 auto 20px auto;
    border: 2px solid #fff;
}

.sidebar h2 {
    font-size: 22px;
    margin: 10px 0;
    text-align: center;
}

.sidebar nav a {
    color: #b9bbbe;
    text-decoration: none;
    display: block;
    margin: 10px 0;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    transition: background 0.3s;
}

.sidebar nav a:hover {
    background-color: #4f545c;
}

.main-content {
    margin-left: 270px;
    padding: 20px;
    box-sizing: border-box;
    width: calc(100% - 270px);
    display: flex;
    gap: 20px; /* 添加间隙 */
}

.content {
    flex-grow: 1;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 10px;
    margin-bottom: 20px;
    border-top: 5px solid #7255ff; /* 改变上边框颜色 */
}

.header h1 {
    margin: 0;
    font-size: 24px;
    color: #333;
    display: flex;
    align-items: center;
}

.header h1 svg {
    margin-left: 10px;
    width: 30px;
    height: 30px;
}

.header input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 300px;
    transition: border-color 0.3s;
}

.header input:focus {
    border-color: #ff69b4;
    outline: none;
}

.header input, .header button {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    transition: border-color 0.3s;
    margin-right: 10px;
}

.header input:focus, .header button:focus {
    border-color: #ff69b4;
    outline: none;
}

.search-container {
    display: flex;
    align-items: center;
}

.search-container input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px 0 0 5px;
    outline: none;
    transition: border-color 0.3s;
    flex: 1;
}

.search-container button {
    padding: 10px 20px;
    border: 1px solid #ccc;
    border-left: none;
    border-radius: 0 5px 5px 0;
    background-color: #f0f0f0;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
}

.search-container button:hover {
    background-color: #e0e0e0;
}

.search-container button:focus {
    border-color: #ff69b4;
    outline: none;
}

.articles {
    margin-top: 20px;
}

.article {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    transition: transform 0.3s, box-shadow 0.3s;
}

.article img {
    width: 150px;
    height: 150px;
    border-radius: 10px;
    margin-right: 20px;
    object-fit: cover;
}

.article-content {
    flex-grow: 1;
}

.article-content h2 {
    margin: 10px 0;
    color: #333;
}

.article-content p {
    color: #666;
}

.article-content .meta {
    display: flex;
    align-items: center;
    color: #999;
    font-size: 14px;
    margin-top: 10px;
}

.article-content .meta svg {
    margin-right: 5px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.pagination a {
    color: #333;
    text-decoration: none;
    padding: 10px 15px;
    margin: 0 5px;
    border-radius: 5px;
    border: 1px solid #ddd;
    transition: background-color 0.3s, color 0.3s;
}

.pagination a:hover {
    background-color: #7255ff;
    color: #fff;
}

.pagination a.active {
    background-color: #7255ff;
    color: #fff;
    border: none;
}

.right-sidebar {
    width: 250px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 20px;
    box-sizing: border-box;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 10px;
    height: fit-content;
}

.right-sidebar p {
    margin: 5px 0;
}

.footer {
    margin-top: 20px;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.footer p {
    margin: 5px 0;
}

.comment {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px; /* 调整评论之间的间距 */
}

.comment-avatar {
    width: 30px; /* 调整头像大小 */
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
}

.comment-content {
    background: #f9f9f9;
    padding: 8px; /* 调整评论内容的内边距 */
    border-radius: 8px; /* 调整圆角大小 */
    flex: 1;
}

.comment-nickname {
    font-weight: bold;
    margin: 0;
    font-size: 14px; /* 调整昵称字体大小 */
}

.comment-text {
    margin: 5px 0 0;
    color: #555;
    font-size: 12px; /* 调整评论文本字体大小 */
}

.header input, .header button {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    transition: border-color 0.3s;
    margin-right: 10px;
}

.header input:focus, .header button:focus {
    border-color: #ff69b4;
    outline: none;
}

.search-container {
    display: flex;
    align-items: center;
}

.search-container input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px 0 0 5px;
    outline: none;
    transition: border-color 0.3s;
    flex: 1;
}

.search-container button {
    padding: 10px 20px;
    border: 1px solid #ccc;
    border-left: none;
    border-radius: 0 5px 5px 0;
    background-color: #f0f0f0;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
}

.search-container button:hover {
    background-color: #e0e0e0;
}

.search-container button:focus {
    border-color: #ff69b4;
    outline: none;
}

/* 标签云样式 */
.tags {
    text-align: center;
}

.tags canvas {
    margin: 0 auto;
    display: block;
    max-width: 100%;
    max-height: 100%;
}

.tag-cloud {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 300px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}


